home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
026a
/
winyn.zip
/
WINYN.PRG
Wrap
Text File
|
1991-07-22
|
1KB
|
63 lines
function winyn
parameters mess,choice_1,choice_2,top,left,titl
*************************************************
*MESS = MESSAGE TO DISPLAY IN THE BOX
*CHOICE_1 = FIRST OF THE 2 CHOICES
*CHOICE_2 = SECOND OF 2 CHOICES
*TOP = TOP ROW OF WINDOW
*LEFT = LEFT COLUMN OF WINDOW
*TITL = TITLE OF BOX
*************************************************
SET TALK OFF
****LOCAL VARIBLES
private RET_VAR
RET_VAR = SPACE(5)
IF MESS = " "
MESS = "Please Choose:"
endif
if choice_1 = " " .and. choice_2 = " "
choice_1 = "Yes"
choice_2 = "No"
endif
choice_1 = " &choice_1 "
choice_2 = " &choice_2 "
mess = " &mess "
winwidth = len(mess)+len(choice_1)+len(choice_2)+5
if top = 99
top = 11
endif
bottom = top + 5
if left = 99
left =(80-winwidth)/2+winwidth
endif
define window winny from top,(80-winwidth)/2 to bottom,left panel
activate window winny
define menu men
define pad men1 of men prompt choice_1 at 2,len(mess)+1
define pad men2 of men prompt choice_2 at 2,len(mess)+len(choice_1)+1
if titl <> " "
@0,(winwidth-len(titl))/2 say titl
endif
@ 2,0 say mess
on selection pad men1 of men deactivate menu
on selection pad men2 of men deactivate menu
activate menu men
deactivate window winny
if pad() = "MEN1"
store trim(choice_1) to ret_var
endif
if pad() = "MEN2"
store trim(choice_2) to ret_var
endif
return ret_var